package com.gwnet.shop.service;


import com.baomidou.mybatisplus.extension.service.IService;
import com.gwnet.shop.domain.OrderDelivery;
import com.gwnet.shop.domain.OrderInfo;

import java.util.List;

/**
 * 订单发货Service接口
 *
 * @author 张万鹏
 * @date 2024-07-21
 */
public interface IOrderDeliveryService extends IService<OrderDelivery>
{
    /**
     * 查询订单发货
     *
     * @param id 订单发货主键
     * @return 订单发货
     */
    public OrderDelivery selectOrderDeliveryById(String id);

    /**
     * 查询订单发货列表
     *
     * @param orderDelivery 订单发货
     * @return 订单发货集合
     */
    public List<OrderDelivery> selectOrderDeliveryList(OrderDelivery orderDelivery);

    /**
     * 新增订单发货
     *
     * @param orderDelivery 订单发货
     * @return 结果
     */
    public int insertOrderDelivery(OrderDelivery orderDelivery);

    /**
     * 修改订单发货
     *
     * @param orderDelivery 订单发货
     * @return 结果
     */
    public int updateOrderDelivery(OrderDelivery orderDelivery);

    /**
     * 批量删除订单发货
     *
     * @param ids 需要删除的订单发货主键集合
     * @return 结果
     */
    public int deleteOrderDeliveryByIds(String[] ids);

    /**
     * 删除订单发货信息
     *
     * @param id 订单发货主键
     * @return 结果
     */
    public int deleteOrderDeliveryById(String id);


    /**
     * 配送状态修改 同时修改orderDelivery 和 orderInfo
     * @param orderDelivery
     * @return
     */
    int changeStatusAndOrderIfoStatus(OrderDelivery orderDelivery);

    /**
     * 查询没有正在执行的平台派单的骑手ID集合
     * @param riderIdList 给定的一批骑手ID
     * @return
     */
    List<Long> selectUnHavePlatformOrderRiderIdList(List<Long> riderIdList);
}
